package com.ymttest.database.sqlwapper;

import java.math.BigDecimal;
import java.util.Date;

import com.ymt.core.tool.Logger;
import com.ymt.database.SqlManager;
import com.ymttest.database.model.AppRuleServiceActivityWeightScore;
import com.ymttest.utils.EnvSetup;

public class AppRuleServiceActivityWeightScoreWapper {

	SqlManager manage;

	public AppRuleServiceActivityWeightScoreWapper() {
		manage = new SqlManager("app" + EnvSetup.getEnv());
	}

	// 在c2c AppRuleServiceActivityWeightScore 插入一条排序规则数据
	public int insert(AppRuleServiceActivityWeightScore record) throws InterruptedException {
		int result = manage.insert("com.ymttest.database.mapping.AppRuleServiceActivityWeightScoreMapper.insert",
				record);
		manage.commit();
		return result;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		AppRuleServiceActivityWeightScore record = new AppRuleServiceActivityWeightScore();
		record.setIsellerid(480948);
		record.setIactivityid(1);
		record.setIlivecountry(2);
		record.setIcategoryid(3);
		record.setIsort(4);
		record.setDbegintime(new Date());
		record.setFra(new BigDecimal(1));
		record.setFrb(new BigDecimal(1));
		record.setFrc(new BigDecimal(1));
		record.setFrd(new BigDecimal(1));
		record.setFre(new BigDecimal(1));
		record.setDlastupdatetime(new Date());
		record.setBisreplay(0);

		try {
			Logger.debug(new AppRuleServiceActivityWeightScoreWapper().insert(record));
		} catch (InterruptedException e) {

			e.printStackTrace();
		}
	}

}
